Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change to new gfs nwp-consumer #732

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions terraform/india/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ module "nwp_consumer_ecmwf_live_ecs_task" {
ecs-task_type = "consumer"
ecs-task_execution_role_arn = module.ecs-cluster.ecs_task_execution_role_arn
ecs-task_size = {
cpu = 2048
memory = 10240
cpu = 512
memory = 1024
}

aws-region = var.region
Expand Down Expand Up @@ -176,8 +176,8 @@ module "nwp_consumer_gfs_live_ecs_task" {
ecs-task_name = "nwp-consumer-gfs-india"
ecs-task_type = "consumer"
ecs-task_size = {
cpu = 1024
memory = 5120
cpu = 512
memory = 1024
}
ecs-task_execution_role_arn = module.ecs-cluster.ecs_task_execution_role_arn

Expand All @@ -192,23 +192,21 @@ module "nwp_consumer_gfs_live_ecs_task" {
]

container-env_vars = [
{ "name" : "MODEL_REPOSITORY", "value" : "gfs" },
{ "name" : "AWS_REGION", "value" : var.region },
{ "name" : "AWS_S3_BUCKET", "value" : module.s3-nwp-bucket.bucket_id },
{ "name" : "ZARRDIR", "value" : "s3://${module.s3-nwp-bucket.bucket_id}/gfs/data" },
{ "name" : "LOGLEVEL", "value" : "DEBUG" },
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn },
{ "name" : "CONCURRENCY", "value" : "false" },
# legacy
{ "name" : "AWS_S3_BUCKET", "value" : module.s3-nwp-bucket.bucket_id },
{ "name" : "ENVIRONMENT", "value" : local.environment },
]
container-secret_vars = []
container-tag = var.version-nwp
container-tag = var.version-nwp-gfs
container-name = "openclimatefix/nwp-consumer"
container-command = [
"download",
"--source=gfs",
"--sink=s3",
"--rdir=gfs/raw",
"--zdir=gfs/data",
"--create-latest",
"--no-rename-vars"
"consume"
]
}

Expand Down
6 changes: 6 additions & 0 deletions terraform/india/development/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ variable version-nwp-ecmwf {
description = "Container image tag of the NWP consumer to use for ECMWF: openclimatefix/nwp-consumer"
}

variable version-nwp-gfs {
type = string
default = "1.0.10"
description = "Container image tag of the NWP consumer to use for GFS: openclimatefix/nwp-consumer"
}

variable version-india_api {
type = string
default = "0.1.0"
Expand Down
6 changes: 5 additions & 1 deletion terraform/modules/services/airflow/dags/india/nwp-dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
task_id="determine_latest_zarr_ecmwf",
)(bucket=f'india-nwp-{env}', prefix='ecmwf/data')

rename_zarr_gfs = determine_latest_zarr.override(
task_id="determine_latest_zarr_gfs",
)(bucket=f'india-nwp-{env}', prefix='gfs/data')

latest_only >> nwp_consumer_ecmwf >> rename_zarr_ecmwf
latest_only >> nwp_consumer_gfs
latest_only >> nwp_consumer_gfs >> rename_zarr_gfs
latest_only >> nwp_consumer_metoffice >> rename_zarr_metoffice

Loading