{
    "version":"0.1.0",
    "id":"mitgcm-prep",
    "use_case":"Catalunya",
    "title":"MITgcm Preprocessing",
    "description":"Preprocessing phase of the AquaINFRA marine modeling chain. Initial conditions, boundary conditions and atmospheric forcing files are generated from Copernicus data to be used as input to the MITgcm model in the Model Run phase.",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "keywords":[
        "AquaINFRA",
        "Marine Modeling System",
        "MITgcm",
        "Catalunya Use Case"
    ],
    "links":[
        {
            "type":"text/html",
            "rel":"about",
            "title":"Website of MITgcm",
            "href":"https://mitgcm.org/",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"about",
            "title":"GitHub repo of MITgcm",
            "href":"https://github.com/MITgcm/MITgcm",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"self",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/mitgcm-prep?f=json",
            "title":"Process description as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/mitgcm-prep?f=html",
            "title":"Process description as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/jobs?f=html",
            "title":"Jobs list as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/jobs?f=json",
            "title":"Jobs list as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/execute",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/mitgcm-prep/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"en-US"
        }
    ],
    "inputs":{
        "input_url_IC_OB":{
            "title":"Zipped Copernicus Input Data (URL) input_url_IC_OBS",
            "description":"URL that points to (zipped) Copernicus data necessary to generate initial and boundary conditions for the model. Optional: If none of the input URLs are provided, pre-downloaded data will be used.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[
                "AquaINFRA",
                "Marine Modeling System",
                "MITgcm",
                "Catalunya Use Case",
                "Copernicus"
            ]
        },
        "input_url_AF":{
            "title":"Copernicus Input Data (URL) input_url_AF",
            "description":"URL that points to Copernicus input data that the preprocessing needs. Note that the filename has to match the pattern 'era5_{RUN_DATE}_{RUN_DATE+PREDICTION_DAYS}.zip', otherwise the preprocessing will fail. Optional: If none of the input URLs are provided, pre-downloaded data will be used.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[
                "AquaINFRA",
                "Marine Modeling System",
                "MITgcm",
                "Catalunya Use Case",
                "Copernicus"
            ]
        },
        "input_url_config_file":{
            "title":"Config file (configure.inc)",
            "description":"URL that points to the configure.inc file to be used for preprocessing.",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_bathymetry_binary":{
            "title":"Bathymetry file (binary)",
            "description":"URL that points to the bathymetry file file to be used for preprocessing (binary format).",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_bathymetry_netcdf":{
            "title":"Bathymetry file (NetCDF)",
            "description":"URL that points to the bathymetry file file to be used for preprocessing (NetCDF format).",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_depths":{
            "title":"Depths file",
            "description":"URL that points to the depths file to be used for preprocessing (*.dat format).",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_river_config":{
            "title":"River configuration file (optional)",
            "description":"URL that points to the River configuration file to be used for preprocessing (*.csv format). Contains information of: river name, position in the model grid, side in whcih is located, number of vertical and horizontal cells, salinity value and if it is a climatology.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rivers":{
            "title":"Individual river files (optional)",
            "description":"List of URLs that point to the (zipped or not) river input files to be used for preprocessing. If the river configuration file is specified, this has to be provided too.",
            "schema":{
                "type":"array"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_T":{
            "title":"RBCS Temperature File (optional)",
            "description":"URL that points file with 3-D relaxation field values for T to be used for preprocessing. Please also specify the corresponding mask.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_T_mask":{
            "title":"RBCS Temperature Mask File (optional)",
            "description":"URL that points to 3-D file with mask for T to be used for preprocessing.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_S":{
            "title":"RBCS S File (optional)",
            "description":"URL that points file with 3-D relaxation field values for S to be used for preprocessing. Please also specify the corresponding mask.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_S_mask":{
            "title":"RBCS S Mask File (optional)",
            "description":"URL that points to 3-D file with mask for S to be used for preprocessing.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_U":{
            "title":"RBCS U File (optional)",
            "description":"URL that points file with 3-D relaxation field values for U to be used for preprocessing. Please also specify the corresponding mask.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_U_mask":{
            "title":"RBCS U Mask File (optional)",
            "description":"URL that points to 3-D file with mask for U to be used for preprocessing.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_V":{
            "title":"RBCS V File (optional)",
            "description":"URL that points file with 3-D relaxation field values for V to be used for preprocessing. Please also specify the corresponding mask.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        },
        "input_url_rbcs_V_mask":{
            "title":"RBCS V Mask File (optional)",
            "description":"URL that points to 3-D file with mask for V to be used for preprocessing.",
            "schema":{
                "type":"string"
            },
            "minOccurs":0,
            "maxOccurs":1,
            "keywords":[]
        }
    },
    "outputs":{
        "output_directory":{
            "title":"Directory containing all the outputs",
            "description":"This is the link to the directory containing all the outputs of this job.",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        },
        "preprocessing_output_files":{
            "title":"Preprocessing output files (model input) directory",
            "description":"This is the link to the directory containing preprocessing output files (= model input files).",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        },
        "configure_inc":{
            "title":"Modified configure.inc",
            "description":"The modified configure.inc file, containing all the parameter values for the simulation, where the user can select a DATE and the number of PREDICTION_DAYS.",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        },
        "log_file":{
            "title":"Log file",
            "description":"Preprocessing run log file",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        },
        "model_run_dir":{
            "title":"Model RUN directory",
            "description":"This is the link to the directory containing: MITgcm namelists adjusted for the specific simulation, MITgcm executable, MITgcm raw output, MITgcm log files (STDERR, STDOUT)",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        },
        "job_id":{
            "title":"Job id",
            "description":"Job id to use to refer to the preprocessing outputs.",
            "schema":{
                "type":"string",
                "contentMediaType":"application/json"
            }
        }
    },
    "example":{
        "inputs":{
            "input_url_config_file":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/configure.inc",
            "input_url_IC_OB":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/cmems_ic_bc_data.zip",
            "input_url_AF":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/era5_2024-01-01_2024-01-03.zip",
            "input_url_bathymetry_binary":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/bathy_interCATSEA_lowres.bin",
            "input_url_bathymetry_netcdf":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/bathy_interCATSEA_lowres.nc",
            "input_url_depths":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/depths.dat",
            "input_url_river_config":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/river_discharges_M3000L015.csv",
            "input_url_rivers":[
                "https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/Catalan_Sea/myrivers.zip"
            ],
            "input_url_rbcs_T":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_T.txt",
            "input_url_rbcs_S":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_S.txt",
            "input_url_rbcs_U":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_U.txt",
            "input_url_rbcs_V":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_V.txt",
            "input_url_rbcs_T_mask":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_T_mask.txt",
            "input_url_rbcs_S_mask":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_S_mask.txt",
            "input_url_rbcs_U_mask":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_U_mask.txt",
            "input_url_rbcs_V_mask":"https://aquainfra.ogc.igb-berlin.de/exampledata/catalunya_marine/dummy/dummyfile_V_mask.txt"
        }
    },
    "outputTransmission":[
        "value"
    ]
}